<?php
if(isset($_COOKIE['hid'])){
    header('Location:welcome');
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Login &raquo; Hospital</title>
        <link href="http://192.168.1.2/salusme/include/css/fal_style.css" rel="stylesheet" type="text/css" />
        <script src="http://192.168.1.2/salusme/include/js/jquery.js" type="text/javascript"></script>
        <script src="http://192.168.1.2/salusme/include/js/flash.js" type="text/javascript"></script>
        <script src="http://192.168.1.2/salusme/include/js/jquery-1.2.6.min.js" type="text/javascript"></script>
    </head>


    <script type="text/javascript">
        $(document).ready(function(){
            $('#login_e_mail').focus(function(){
                if($('#login_e_mail').val()=="E-mail")
                    $('#login_e_mail').val('');
            });
            $('#login_e_mail').blur(function(){
                if($('#login_e_mail').val()=="")
                    $('#login_e_mail').val('E-mail');
            });
            $('#login_password').focus(function(){
                $('#l_password').show();
                $('#l_password').focus();
                $('#login_password').hide();
            });
            $('#l_password').blur(function(){
                if($('#l_password').val()==""){
                    $('#login_password').show();
                    $('#l_password').hide();
                }
            });
            $('#l_password').hide();

            $('#login_form').submit(function(){
                if($('#login_e_mail').val() == "E-mail"){
                    $('#login_e_mail').addClass('error');
                    return false;
                }
                if($('#login_password').is(':visible')){
                    if($('#login_password').val() == "Password"){
                        $('#login_password').addClass('error');
                        return false;
                    }
                }
            });
        })
    </script>
    <body>
        <script type="text/javascript">
            $(document).ready(function(){
                $('#emr').submit(function(){
                    if($('#emr_e_mail').val() == "E-mail"){
                        $('#emr_e_mail').addClass('error');;
                        return false;
                    }
                    if($('#emr_login_password').is(':visible')){
                        if($('#emr_login_password').val() == "Password"){
                            $('#emr_login_password').addClass('error');
                            return false;
                        }
                    }
                });


                $('#emr_login_password').focus(function(){
                    $('#emr_l_password').show();
                    $('#emr_l_password').focus();
                    $(this).hide();
                });
                $('#emr_l_password').blur(function(){
                    if($(this).val()==""){
                        $('#emr_login_password').show();
                        $(this).hide();
                    }
                });
                $('#emr_e_mail').focus(function(){
                    if($(this).val()=="E-mail")
                        $(this).val('');
                });
                $('#emr_e_mail').blur(function(){
                    if($(this).val()=="")
                        $(this).val('E-mail');
                });


                $('#prepaid_code').focus(function(){
                    if($(this).val()=="Prepaid code")
                        $(this).val('');
                });
                $('#prepaid_code').blur(function(){
                    if($(this).val()=="")
                        $(this).val('Prepaid code');
                });

                $('#name').focus(function(){
                    if($(this).val()=="User Name")
                        $(this).val('');
                });
                $('#name').blur(function(){
                    if($(this).val()=="")
                        $(this).val('User Name');
                });


                $('#surname').focus(function(){
                    if($(this).val()=="Surname")
                        $(this).val('');
                });
                $('#surname').blur(function(){
                    if($(this).val()=="")
                        $(this).val('Surname');
                });

                $('#e_mail').focus(function(){
                    if($(this).val()=="E-mail")
                        $(this).val('');
                });
                $('#e_mail').blur(function(){
                    if($(this).val()=="")
                        $(this).val('E-mail');
                });

                $('#sup__password').focus(function(){
                    $('#sup_password').show();
                    $('#sup_password').focus();
                    $(this).hide();
                });
                $('#sup_password').blur(function(){
                    if($(this).val()==""){
                        $('#sup__password').show();
                        $(this).hide();
                    }
                });
                $('#prapid_code_no').click(function(){
                    $('#prepaid_code').hide();
                });
                $('#prapid_code_yes').click(function(){
                    $('#prepaid_code').show();
                });

                $('#sign_up').submit(function(){
                    if($('#prepaid_code').is(':visible'))
                        if($('#prepaid_code').val()=="Prepaid code"){
                            $('#prepaid_code').addClass('error');
                            return false;
                        }
                });


            });
        </script>
        <div id="wrapper">


            <div id="header">
            </div>


            <div id="mainContent">
                <h1 style="color: #4B9BCE;" >Welcome To Hospital Department</h1>
                <?php
                if ($_GET['err'] != '') {
                    echo '<font color=red>' . $_GET['err'] . '</font>';
                }
                ?>
                
                <fieldset style="width: 300px; margin-left: 50px; margin-right: 200px; " >
                    <legend style="color: #4B9BCE;">Login to your Hospital Account</legend>
                    <div>
                        <form id="sign_up" action="login.php" method="post">
                            <div><input type="text" name="user_name" required placeholder="User name" class="text_field"/></div>                            
                            <div><input  class="text_field" required type="password" placeholder="Password" name="password" /></div>
                            <div><input type="submit" value="   Login    "  /></div>
                        </form>
                    </div>
                </fieldset>
            </div>
            <style type="text/css">
                .footer_first a
                {
                    color:#4B9BCE;
                    font-weight: bold;
                }
            </style>

            <div class="clear"></div>
            <div id="footer">

                <hr/>
                <form name="frm1" action="http://www.salusbank.ch/salus_ritz/index.php/home/lang" method="post">
                    <input type="hidden" value="/salus_ritz/index.php/auth/login.html" name="path">
                        <input type="hidden" value="english" name="lang">
                            <div class="float_left footer_first"><a href="javascript:document.frm1.submit()">English</a></div>
                            </form>

                            <form name="frm2" action="http://www.salusbank.ch/salus_ritz/index.php/home/lang" method="post">
                                <input type="hidden" value="/salus_ritz/index.php/auth/login.html" name="path">
                                    <input type="hidden" value="italian" name="lang">
                                        <div class="float_left footer_first"><a href="javascript:document.frm2.submit()">Italiano</a></div>
                                        </form>

                                        <form name="frm3" action="http://www.salusbank.ch/salus_ritz/index.php/home/lang" method="post">
                                            <input type="hidden" value="/salus_ritz/index.php/auth/login.html" name="path">
                                                <input type="hidden" value="deutsch" name="lang">
                                                    <div class="float_left footer_first"><a href="javascript:document.frm3.submit()">Deutsch</a></div>
                                                    </form>
                                                    <div class="float_left footer_first">Español</div>
                                                    <div class="float_left footer_first">Français</div>
                                                    <div class="float_left footer_first">Portugues</div>
                                                    <div class="float_left footer_first">Српски</div>
                                                    <div class="float_left footer_first">Türkçe</div>
                                                    <div class="float_left footer_first">Русский</div>
                                                    <div class="float_left footer_first">Dansk</div>
                                                    <div class="float_left footer_first">Magyar</div>
                                                    <div class="clear"></div>
                                                    <div class="float_left footer_second"><a href="http://www.salusbank.ch/salus_ritz/index.php/">Home</a></div>
                                                    <div class="float_left footer_second"><a href="http://www.salusbank.ch/salus_ritz/index.php/pages/about_page">About</a></div>
                                                    <div class="float_left footer_second"><a href="http://www.salusbank.ch/salus_ritz/index.php/pages/help_page">Help<a></div>
                                                                <div class="float_left footer_second"><a href="http://www.salusbank.ch/salus_ritz/index.php/pages/where_page">Where<a></div>
                                                                            <div class="float_left footer_second"><a href="http://www.salusbank.ch/salus_ritz/index.php/pages/privacy_page">Privacy<a></div>
                                                                                        <div class="float_left footer_second"><a href="http://www.salusbank.ch/salus_ritz/index.php/pages/certification_page">Certifications<a></div>
                                                                                                    <div class="float_left footer_second"><a href="http://www.salusbank.ch/salus_ritz/index.php/pages/contact_page">Contact<a></div>
                                                                                                                <div class="clear"></div>
                                                                                                                <div style="font-size: 11px;color: #454545;margin-left: 10px">Copyright&copy;2012 Salusbank</div>
                                                                                                                </div>
                                                                                                                </div> 
                                                                                                                </body>
                                                                                                                </html> 
